# -*- coding: UTF-8 -*-
"""
@author: tgy
@file: method_demo.py
@time: 2021/01/31
"""
import delegate

class Person:

    @staticmethod
    def run(a,b):
        print(a,b)

    def say(self):
        ...

def test01():
    per = Person()
    say = per.say
    print(say.__self__,say.__func__)


class Factory:

    @staticmethod
    def get_instance(cls,*args,**kwargs):
        return cls(*args,**kwargs)

def test02():
    wrapper = getattr(delegate,'Wrapper')
    print(wrapper)
    ins = Factory.get_instance(wrapper,[1,2,3])
    ins.append(4)




if __name__ == '__main__':
    pass
    # Person.run(1,2)
    test02()